package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 个人积分明细
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_integral_detail")
public class UserIntegralDetail extends Model<UserIntegralDetail> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "did", type = IdType.ASSIGN_ID)
    private String did;
    /**
     * 单次积分
     */
    @TableField("integral")
    private BigDecimal integral;
    /**
     * 说明
     */
    @TableField("note")
    private String note;
    /**
     * 时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 状态:0消费 1获得
     */
    @TableField("status")
    private Integer status;
    /**
     * 积分类型
     */
    @TableField("point_type")
    private String pointType;
    /**
     * 用户唯一标识
     */
    @TableField("user_id")
    private String userId;
    /**
     * 业务ID
     */
    @TableField("bid")
    private String bid;

    public void freeData() {
        this.did = null;
        this.integral = null;
        this.note = null;
        this.addTime = null;
        this.status = null;
        this.pointType = null;
        this.userId = null;
        this.bid = null;
    }

}
